package com.thoughtworks;

/**
 * Created by revathyr on 7/22/14.
 */
public class OutputProcess extends Process{

    public void showGeneralMenu(){
        System.out.println("choose what you wish to do: .... 0.Browse book   1.Login   .Quit");

    }
    public void showLibrarianMenu(){
        System.out.println("Choose what you wish to do..... 0.Browse books/movies   6.View my profile   8.Quit  7.Log out 9.Who took this book?");

    }
    public void showCustomerMenu(){
        System.out.println("Choose what you wish to do..... 0.Browse books/movies   2.Check out Book  3.Check out movie  4.Return book  5.Return movie 6.View my profile   8.Quit  7.Log out");

    }
    public void logOut()
    {

        System.out.println("Thank you!you have logged out!");
        showGeneralMenu();
    }
    public void printWelcomeMessage(String userName)
    {
        System.out.println("Welcome"+ userName);


    }
    public void printThankYouWhenTheUserQuits()
    {
        System.out.println("thank you for visiting the library!");
    }
    public void printThankYouMessageForCheckingOut(Class rentableClass)
    {
        String entity=rentableClass.getSimpleName().toLowerCase();
        System.out.println("thank you!Enjoy the"+entity);
    }
    public void printThankYouMessageForReturnin(Class rentableClass)
    {
        String entity=rentableClass.getSimpleName().toLowerCase();

        System.out.println("Thank you for returning the"+entity);

    }
    public void printUserDetails(User user){
        System.out.println("Name " + user.getName());
        System.out.println("Mobile number  "+ user.getMobileNumber());
        System.out.println("Email- id "+ user.getEmailId());
        System.out.println("Library number "+ user.getLibraryNumber());


    }
    public void whenUnknownOptionIsSelected()
    {
        System.out.println("Select a valid option!");
    }
    public void printMenuForBook() {
        System.out.println("list of books");
        System.out.format("%-30s%-30s%-30s", "BOOK", "AUTHOR", "PUBLISHED YEAR");
        System.out.println();
    }
    public void printAvailableBooks(Book book) {
        System.out.println();
            System.out.format("%-30s%-30s%-30s", book.getEntityName(), book.getAuthorName(), book.getPublishedYear());
        }

    public void printAllMovies() {
        System.out.println("List of movies");
        System.out.println();
        System.out.format("%-30s%-30s%-30s%-30s", "Movie", "Director", "Year of release", "Movie rating");
    }
    public void printAvailableMovies(Movie movie){
        System.out.println();
        System.out.format("%-30s%-30s%-30s%-30s", movie.getEntityName(), movie.getDirectorName(), movie.getYearOfRelease(), movie.getMovieRating());


    }
    public void printWhoHAsIt(String userId)
    {
        System.out.println(userId+"  "+"is having the entity");

    }

}
